# 定义windows平台宏
macro(DECLARE_VISUAL_STUDIO_MACROS)
    if (MSVC)
        add_definitions(-D_WINDOWS)
        if(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
            add_definitions(-D_WIN32)
        elseif(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
            add_definitions(-D_WIN64)
        endif()
        
        set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} "/D_DEBUG")
        
        add_definitions(-D_WIN32_WINNT=0x0501)
        add_definitions(-W3)
    endif()
endmacro()